s = input("输入一个由单词组成的字符串，用空格分隔")
ls = s.split()
print(ls)
dt = {}
for i in ls:
    if i in dt.keys():
        dt[i] += 1
    else:
        dt[i] = 1
print(dt)
